"use strict";
const { getRequest } = require("request");
const { util } = require("utils");
exports.main = async (event, context) => {
    //event为客户端上传的参数

    let [err, data] = await getRequest("https://api.weixin.qq.com/cgi-bin/token")({
        grant_type: "client_credential",
        appid: "wx172bbac9c0ca3417",
        secret: "9901de712a4e73c6a18453c9e541af3d"
    });
    console.log(err, data);
    return data;

    // console.log("event : ", event);
    // let { SPACEINFO: { provider } = {} } = context || {};
    // let [err, data] = await authToken(
    //     {
    //         tokenType: "wx_web_ticket",
    //         appId: "wx172bbac9c0ca3417",
    //         appSecret: "9901de712a4e73c6a18453c9e541af3d",
    //     },
    //     provider
    // );
    // let res = await util.resPack(data, err);
    // return res
};
